//
//  XMCallNotEnoughView.m
//  XunMi
//
//  Created by MacBook on 2024/5/17.
//  Copyright © 2024 TieZhu. All rights reserved.
//

#import "XMCallNotEnoughView.h"

@implementation XMCallNotEnoughView

- (void)awakeFromNib {
    [super awakeFromNib];
    NSString *str = @"您现有金币已不足通话一分钟是否充值？";
    NSMutableAttributedString *aStr = [[NSMutableAttributedString alloc] initWithString:str];
    
    [aStr addAttributes:@{NSForegroundColorAttributeName:kHEX(@"#F83953"), NSFontAttributeName:[UIFont fontWithName:@"PingFangSC-Medium" size:14]} range:[str rangeOfString:@"不足通话一分钟"]];
    
    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
    paragraphStyle.alignment = NSTextAlignmentCenter;
    paragraphStyle.lineSpacing = 8;
    [aStr addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, aStr.length)];
    self.descLa.attributedText = aStr;
}

- (IBAction)recharge:(UIButton *)sender {
    if (self.reBlock) {
        self.reBlock();
    }
}

- (IBAction)close:(id)sender {
    if (self.closeBlock) {
        self.closeBlock();
    }
}

@end
